import 'package:love_newf/generated/json/base/json_convert_content.dart';
import 'package:love_newf/app/com/model/wallet_balance_model.dart';

WalletBalanceModel $WalletBalanceModelFromJson(Map<String, dynamic> json) {
  final WalletBalanceModel walletBalanceModel = WalletBalanceModel();
  final int? money = jsonConvert.convert<int>(json['money']);
  if (money != null) {
    walletBalanceModel.money = money;
  }
  final int? tokens = jsonConvert.convert<int>(json['tokens']);
  if (tokens != null) {
    walletBalanceModel.tokens = tokens;
  }
  return walletBalanceModel;
}

Map<String, dynamic> $WalletBalanceModelToJson(WalletBalanceModel entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['money'] = entity.money;
  data['tokens'] = entity.tokens;
  return data;
}

extension WalletBalanceModelExtension on WalletBalanceModel {
  WalletBalanceModel copyWith({
    int? money,
    int? tokens,
  }) {
    return WalletBalanceModel()
      ..money = money ?? this.money
      ..tokens = tokens ?? this.tokens;
  }
}